<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/warehouse/label_damage_edit.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/label_damage/label_damage_editEntity.shtml">
		<input type="hidden" class="form-control"
			value="${label.enterId}" name="labelprintFormMap.enterId" id="enterId">
		<input type="hidden" class="form-control checkacc"
			value="${label.id}" name="labelprintFormMap.id" id="id">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">生产结束时间</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="pfinishtime" readonly
							value="${label.pfinishtime }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">物料编码</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="material_code" readonly
							value="${label.material_code }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">物料名称</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="oname" readonly
							value="${label.oname }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">模具编码</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="now_mold_encode" readonly
							value="${label.now_mold_encode }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">生产订单数</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="number" readonly
							value="${label.number }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">入库数</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="numberOfStorage" readonly
							value="${label.numberOfStorage }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">仓位</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="warehouse" readonly
							value="${label.warehouse }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>	
				<div class="form-group">
					<label class="col-sm-3 control-label">损坏张数</label>
					<div class="col-sm-9">
						<input type="number" min="0" class="form-control checkabh" id="damageCount"
							name="labelprintFormMap.damageCount" value="${label.damageCount }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">备注</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh" id="damageRemark"
							name="labelprintFormMap.damageRemark" value="${label.damageRemark }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<input type="hidden" id="printCount"
					name="labelprintFormMap.printCount" value="${label.printCount }"/>
				<input type="hidden" id="returnCount"
					name="labelprintFormMap.returnCount" value="${label.returnCount }"/>
				<input type="hidden" id="actualCount"
					name="labelprintFormMap.actualCount" value="${label.actualCount }"/>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		$(function() {
			$("#damageCount").change(function() {
				var printCount = $("#printCount").val();
				var returnCount = $("#returnCount").val();
				var damageCount = $("#damageCount").val();
				$("#actualCount").val(printCount-returnCount-damageCount);
			});
		});
	</script>
</body>
</html>